public class Test {
    public static void main(String[] args) {
        int[] arr = {11,22,33,44,66,55};
        System.out.println(change(arr));
    }

    public static String change(int[] arr){
        if(arr==null){
            System.out.println("这个数组是空的");
            return null;
        }
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("[");
        for (int i = 0; i < arr.length; i++) {
            stringBuilder.append(arr[i]).append(i==arr.length-1? "":",");
        }
        stringBuilder.append("]");
        return stringBuilder.toString();
    }
}
